<link rel="stylesheet" rev="stylesheet" href="./css/My_Manage_Prop.css" type="text/css">
<script async="" src="./js/st.js"></script>
<script src="./includes/common.js" type="text/javascript"></script>
<script src="./includes/jquery-1.7.min.js" type="text/javascript"></script>
<script src="./mfu/jquery.MultiFile.js" type="text/javascript" language="javascript"></script>
<script>
function verify(){

	var biaoti = document.getElementsByName("biaoti")[0].value;
	var xiaoquming = document.getElementsByName("xiaoquming")[0].value;
	var xiaoqudizhi = document.getElementsByName("xiaoqudizhi")[0].value;
	var quyu = document.getElementsByName("quyu")[0].value;
	var fangling = document.getElementsByName("fangling")[0].value;
	var mianji = document.getElementsByName("mianji")[0].value;
	var huxing_shi = document.getElementsByName("huxing_shi")[0].value;
	var huxing_ting = document.getElementsByName("huxing_ting")[0].value;
	var huxing_wei = document.getElementsByName("huxing_wei")[0].value;
	var louceng_dangqian = document.getElementsByName("louceng_dangqian")[0].value;
	var louceng_zong = document.getElementsByName("louceng_zong")[0].value;
	var zujin = document.getElementsByName("zujin")[0].value;
	var jieshao = document.getElementsByName("jieshao")[0].value;
	var dianhua = document.getElementsByName("dianhua")[0].value;





	if(biaoti.replace(/[ ]/g,"") == ""){
	 	alert("请输入标题！");
	 	return false;
	 }else if(xiaoquming.replace(/[ ]/g,"") == ""){
	    alert("请输入小区名！");
	    return false;
	 }else if(xiaoqudizhi.replace(/[ ]/g,"") == ""){
	 	alert("请输入小区地址！");
	 	return false;
	 }else if(quyu.replace(/[ ]/g,"") == ""){
	 	alert("请选择小区方位！");
	 	return false;
	 }else if(fangling.replace(/[ ]/g,"") == ""){
	 	alert("请输入房龄！");
	 	return false;
	 }else if(mianji.replace(/[ ]/g,"") == ""){
	 	alert("请输入面积！");
	 	return false;
	 }else if(huxing_shi.replace(/[ ]/g,"") == ""){
			alert("请输入户型为几室！");
			return false;
	 }else if(huxing_ting.replace(/[ ]/g,"") == ""){
			alert("请输入户型为几厅！");
			return false;
	 }else if(huxing_wei.replace(/[ ]/g,"") == ""){
			alert("请输入户型为几卫！");
			return false;
	 }else if(louceng_dangqian.replace(/[ ]/g,"") == ""){
			alert("请输入房屋楼层！");
			return false;
	 }else if(louceng_zong.replace(/[ ]/g,"") == ""){
			alert("请输入总楼层！");
			return false;
	 }else if(zujin.replace(/[ ]/g,"") == ""){
	 	alert("请输入租金！");
	 	return false;
	 }else if(dianhua.replace(/[ ]/g,"") == ""){
	 	alert("请输入电话号码！");
	 	return false;
	 }



	 if(isNaN(fangling)){
			alert("房龄只能为数字！");
			return false;
	 }else 	if(isNaN(zujin)){
			alert("租金只能为数字！");
			return false;
	 	}else 	if(isNaN(mianji)){
			alert("面积只能为数字！");
			return false;
	 	}
	 else if(isNaN(zujin)){
			alert("电话只能为数字！");
			return false;
	 	}



	 return true;
}

</script>
<?php
$result_info = "";
session_start();
if($_SESSION['user_id']){
$userid = $_SESSION['user_id'];
$username = $_SESSION['user_name'];
}else{
	  echo "<script>alert('请先登录!');location='../login.php';</script>";
}

            require_once("./includes/configure.php");
			require_once("./includes/database.php");
			$db = Database::Connect();

			$zufang_quyu_array = $db->getConfigurationArray('zufang_quyu');
			$zufang_leixing_array = $db->getConfigurationArray('zufang_leixing');


if($_POST['submit']){


	 $houseid = $_POST['id'];

	 $biaoti = $_POST['biaoti'];
	 $xiaoquming = $_POST['xiaoquming'];
	 $xiaoqudizhi = $_POST['xiaoqudizhi'];
	 $quyu = $_POST['quyu'];
	 $quyu2 = $_POST['quyu2'];

  	 $chuzufangshi = $_POST['chuzufangshi'];

  	 $huxing_shi = $_POST['huxing_shi'];

	 $huxing_ting = $_POST['huxing_ting'];

	 $huxing_wei = $_POST['huxing_wei'];

      $huxing = $huxing_shi.'|'.$huxing_ting.'|'.$huxing_wei;

	 $louceng_dangqian = $_POST['louceng_dangqian'];

	 $louceng_zong = $_POST['louceng_zong'];

	 $louceng = $louceng_dangqian.'|'.$louceng_zong;

	 $fangwuleixing = $_POST['fangwuleixing'];

	 $zhuangxiu = $_POST['zhuangxiu'];

	 $chaoxiang = $_POST['chaoxiang'];

	 $zujin = $_POST['zujin'];

	 $jiaoyifangshi = $_POST['jiaoyifangshi'];

	  $peizhi = $_POST['peizhi'];

	 $jieshao = $_POST['jieshao'];

	 $dianhua = $_POST['dianhua'];

	 $lianxiren = $_POST['lianxiren'];

	 $fangling = $_POST['fangling'];

	 $mianji = $_POST['mianji'];
	 $hidephone = $_POST['hidephone'];
	 if(!$hidephone){$hidephone=0;}



	 if(trim($biaoti) == ""){
	 	$result_info="请输入标题！";
	 }else if(trim($xiaoquming) == ""){
	    $result_info="请输入小区名！";
	 }else if(trim($xiaoqudizhi) == ""){
	 	$result_info="请输入小区地址！";
	 }else if(trim($quyu) == "0"){
	 	$result_info="请输入小区方位！";
	 }else if(trim($fangling) == ""){
	 	$result_info="请输入房龄！";
	 }else if(trim($fangling) != ""){
	 	if(!is_numeric($fangling)){
			$result_info="房龄只能为数字！";
	 	}
	 }else if(trim($mianji) == ""){
	 	$result_info="请输入面积！";
	 }else if(trim($mianji) != ""){
	 	if(!is_numeric($mianji)){
			$result_info="面积只能为数字！";
	 	}
	 }else if(trim($huxing_shi) == ""){
			$result_info="请输入户型为几室！";
	 }else if(trim($huxing_ting) == ""){
			$result_info="请输入户型为几厅！";
	 }else if(trim($huxing_wei) == ""){
			$result_info="请输入户型为几卫！";
	 }else if(trim($louceng_dangqian) == ""){
			$result_info="请输入房屋楼层！";
	 }else if(trim($louceng_zong) == ""){
			$result_info="请输入总楼层！";
	 }else if(trim($zujin) == ""){
	 	$result_info="请输入租金！";
	 }else if(trim($zujin) != ""){
	 	if(!is_numeric($zujin)){
			$result_info="租金只能为数字！";
	 	}
	 }else if(trim($jieshao) == ""){
	 	$result_info="详细介绍不能为空！";
	 }else if(trim($dianhua) == ""){
	 	$result_info="请输入电话号码！";
	 }else if(trim($dianhua) != ""){
	 	if(!is_numeric($dianhuajin)){
			$result_info="电话只能为数字！";
	 	}
	 }

	 //
		if(true){
		//循环上传
		$debug_echo = false;
		$upload_result = '';
		$insert_db_str = '';
		$file_input_name = 'upload_files';//表单的文件input name
			for($upload_index=0;$upload_index<count($_FILES[$file_input_name][name]);$upload_index++){
				$target = "upload/chuzu/";
				//文件存放位置，用这种分文件加的方式，类似二分法原理，当文件比较多的时候，可以加快一点速度
				$img_file_floder = $target.date('Ymd');
				if(!file_exists($img_file_floder))
				{
				   //检查是否有该文件夹，如果没有就创建，并给予最高权限
				   mkdir("$img_file_floder", 0755);
				}
				//中文也没有问题,但是不建议用,特别是在linux这种环境,自己根据自己需要做调整吧
				$target = $img_file_floder .'/'. time().'_'.rand(1,250).substr(basename($_FILES[$file_input_name]['name'][$upload_index]),strlen(basename($_FILES[$file_input_name]['name'][$upload_index]))-4);
				$this_file_name = basename($_FILES[$file_input_name]['name'][$upload_index]) ;
				$ok=1;

				$uploaded_size = $_FILES["upload_files"]["size"][$upload_index];
				$uploaded_type = $_FILES["upload_files"]["type"][$upload_index];
				//This is our size condition
				if ($uploaded_size > 2000*1024) {
					if($debug_echo)echo "你上传的文件' $this_file_name '太大了.<br/>";
					$upload_resul.="你上传的文件' $this_file_name '太大了.<br/>";
					$ok=0;
				}

				//This is our limit file type condition
				if (!($uploaded_type =="image/jpeg" || $uploaded_type =="image/pjpeg" ||$uploaded_type =="image/gif"||$uploaded_type =="image/png")) {
					if($debug_echo && $this_file_name!="")echo "上传文件' $this_file_name '类型出错<br/>";
					$upload_resul.="上传文件' $this_file_name '类型出错<br/>";
					$ok=0;
				}


				if ($ok==0) { //Here we check that $ok was not set to 0 by an error
					if($debug_echo)echo "' $this_file_name '文件没有上传成功.<br/>";
				} else 	{ //If everything is ok we try to upload it
					if(move_uploaded_file($_FILES[$file_input_name]['tmp_name'][$upload_index], $target)) {
						$insert_db_str .=$target.';';
						if($debug_echo)echo "文件 ' $this_file_name ' 上传成功 <br/>";
						$upload_resul.="文件 ' $this_file_name ' 上传成功 <br/>";
					} else 	{
						if($debug_echo)echo "对不起,上传文件' $this_file_name ' 的时候发生了错误.";
						$upload_resul.="对不起,上传文件' $this_file_name ' 的时候发生了错误.";
					}
				}
			}
		}
	 //

		if(!$result_info){
			$xiaoquming = $db->Encode($xiaoquming);
			$chuzufangshi=$db->Encode($chuzufangshi);
			$huxing=$db->Encode($huxing);
			$louceng=$db->Encode($louceng);
			$fangwuleixing=$db->Encode($fangwuleixing);
			$zhuangxiu=$db->Encode($zhuangxiu);
			$chaoxiang=$db->Encode($chaoxiang);
			$zujin=$db->Encode($zujin);
			$jiaoyifangshi=$db->Encode($jiaoyifangshi);
			$peizhi=$db->Encode($peizhi);
			$jieshao=$db->Encode($jieshao);
			$dianhua=$db->Encode($dianhua);
			$lianxiren=$db->Encode($lianxiren);
			$fangling=$db->Encode($fangling);
			$mianji=$db->Encode($mianji);
			$hidephone = $db->Encode($hidephone);
			$quyu=$db->Encode($quyu);
			$quyu2=$db->Encode($quyu2);
			$xiaoqudizhi=$db->Encode($xiaoqudizhi);
		    $biaoti = $db->Encode($biaoti);
			$quyu2=$db->Encode($quyu2);
			$xiaoqu_var = '';
			$xiaoqu_value = '';
			if($quyu){
				$xiaoqu_var = ',quyu';
				$xiaoqu_value = ",$quyu";
			}
			if($quyu2){
				$xiaoqu_var .= ',quyu2';
				$xiaoqu_value .= ",$quyu2";
			}

			$sql = "select this_id from xiaoqu where xiaoquming = '$xiaoquming'";
			$xiaoquid = $db->GetSingleVal($sql);
			echo $xiaoquid;
			if($xiaoquid ==null){
			$sql = "INSERT INTO xiaoqu
				(xiaoquming,dizhi$xiaoqu_var)
				VALUES ('$xiaoquming','$xiaoqudizhi'$xiaoqu_value)";//默认1为求租
		    $db->Execute($sql);
			$xiaoquid = mysql_insert_id();
			}



			if($houseid){
			$sql2 = "update zufang set mianji='$mianji',faburen=$userid,fangling='$fangling',jiage=$zujin,huxing='$huxing',leixing='$fangwuleixing',zulin='$chuzufangshi',biaoti='$biaoti',dianhua='$biaoti',lianxiren='$lianxiren',dizhi='$xiaoqudizhi',louceng='$louceng',xiaoqu=$xiaoquid,zhuangxiu='$zhuangxiu',chaoxiang='$chaoxiang',fangshi=$userid,jieshao='$jieshao',hidephone=$hidephone";
			$result_info = '修改成功';
			}else{
		    $sql2 = "insert into zufang" .
		    		"(quyu2,quyu,mianji,faburen,fangling,jiage,huxing,leixing,zulin,biaoti,dianhua,lianxiren,dizhi,louceng,xiaoqu,zhuangxiu,chaoxiang,fangshi,jieshao,time,tupian,hidephone)" .
		    		" values($quyu2,$quyu,'$mianji',$userid,'$fangling',$zujin,'$huxing','$fangwuleixing','$chuzufangshi','$biaoti','$dianhua','$lianxiren','$xiaoqudizhi','$louceng',$xiaoquid,'$zhuangxiu','$chaoxiang','$jiaoyifangshi','$jieshao',now(),'$insert_db_str',$hidephone)";
			}
		    $db->Execute($sql2);
//			$result_info = '发布成功 &nbsp;&nbsp;<a href="./geren.php?main=chuzu_list">查看我发布的出租信息</a>';
            $result_info = '发布成功咯！';
//			$houseid = mysql_insert_id();
//			$result_info.='<br/>'.$upload_result;
		    echo "<script>alert('$result_info');location='./geren.php?main=chuzu_list';</script>";
		}

}else if($_GET['id']){
	$houseid = $_GET['id'];
	$sql = "select * from zufang where id=$hosueid";
}





		    $db->Close();
?>

<div class="right_container">
 <div id="MyAnjuke">
<div class="tab">
		<h1>
			<dl><dt class="tL"></dt><dt class="t0">我要出租<!-- (100) --></dt><dt class="tR"></dt></dl>
		</h1>
	</div></div>
	 <div id="content">
<!-- onsubmit="return verify();"   -->
        <form enctype="multipart/form-data" method="post" action=""  onsubmit="return verify();" name="propertys" id="propertys">
<div class="my_prop_container">
<!-- 2011-10-20 招财猫项目 隐藏 -->
    <div style="display:none;" class="my_prop_banner">
        <a hidefocus="true" href="http://beijing.haozu.com">北京好租</a><span class="space2">&gt;</span>发布房源
    </div>

<!-- 2011-8-25 招财猫项目 注释 -->

<!-- 2011-10-20 招财猫项目 隐藏 -->
    <div style="border-top:1px solid #ececec; display:none;" class="myPropTipsInfo">
        <strong>友情提示：</strong>
            <ul>
                               <li>1. 您最多可以发布<strong class="red">3 </strong>套出租房源</li>
                               <li>2. 请勿在房源标题或小区地址中填写电话，请勿在图片中附加电话信息，否则您的房源将被删除</li>
               <li>3. <span class="red">置业顾问冒充个人一律删除信息，并冻结帐号</span>&nbsp;&nbsp;&nbsp;&nbsp;[全新置业顾问租房平台--租房通] <a id="apf_id_1_broker_url" target="_blank" title="" href="http://beijing.haozu.com/promotion/zufanginfo/"></a></li>
            </ul>
    </div>


<input type="hidden" value="http://my.haozu.com/prop/publish/" name="hidden_apf_id_1" id="hidden_apf_id_1">
<input type="hidden" value="" name="rt" id="hidden_apf_id_1_rt">
<input type="hidden" value="" name="type">
<input type="hidden" value="post" name="act">
<input type="hidden" value="2" name="f61">
<input type="hidden" value="" name="flg">

<div class="my_prop_putoutbox">
<table width="970" cellspacing="0" cellpadding="0" border="0">
<!-- 基本信息 -->
    <tbody><tr>
        <td style="height:40px;" class="f14"><strong>1.房源信息</strong></td>
        <td>(<span class="star">*</span></td>
        <td>为必填)</td>
    </tr>


  <input type="hidden" name="id" value="<?php echo $houseid?>"/>


    <tr>
    	<th colspan="3">  <p style="color:red;padding:5px;font-size:17px;padding-left:122px;">
			<strong><?php echo $result_info;?></strong>
		</p></th>
    </tr>
    <tr>
        <th style="height:46px;" class="basic_header">房源标题：</th>
        <td class="star">*</td>
        <td>

            <input name="biaoti" type="text" onblur="this.value = this.value.replace(/[０１２３４５６７８９]/g, function(v){return v.charCodeAt(0)-65296;});" style="width:389px;" maxlength="30" size="60" value="" id="apf_id_1_f2"  class="default_color">

        </td>
    </tr>

    <tr>
        <th class="basic_header">小区名称：</th>
        <td class="star">*</td>
        <td>

            <div style="height:26px;" id="apf_id_1_comm_basic" class="my_prop_comm_basic">
                <input type="text" class="default_color" maxlength="20" size="40" value="" id="apf_id_1_f6" name="xiaoquming" autocomplete="off" >
                <span class="floatClew" id="apf_id_1_err_f6">
                                </span>
            </div>

        </td>
    </tr>

    <!-- 2011-10-20 招财猫项目 隐藏 -->
    <tr style="display:none;">
        <th class="basic_header"></th>
        <td></td>
        <td valign="top" class="my_prop_comm_simple_box">
            <div style="display:none;" id="apf_id_1_comm_simple" class="my_prop_comm_simple">
                <iframe scrolling="no" frameborder="0" style="margin:2px;width:496px;height:400px;left:0;position:absolute;top:0;z-index:1;" id="apf_id_1_iframe"></iframe>
                <div style="border:2px solid #666;width:496x;background:#fff;">
                    <div class="header">
                        <div id="apf_id_1_simple_comm_close" class="close cancel">&nbsp;&nbsp;</div>
                        <div style="float:left;margin-top:0px;_margin-top:8px;line-height:35px;">通过位置查找小区</div>
                    </div>
                    <div class="main">
                        <div class="area">
                            <h5>选择区域</h5>
                            <div id="apf_id_1_simple_area" class="area_list">
                              <ul>
                                                            <li onclick="obj.setSimpleArea(642, true)" id="apf_id_1_simple_area_642" value="642">朝阳</li>
                                                            <li onclick="obj.setSimpleArea(601, true)" id="apf_id_1_simple_area_601" value="601">海淀</li>
                                                            <li onclick="obj.setSimpleArea(753, true)" id="apf_id_1_simple_area_753" value="753">丰台</li>
                                                            <li onclick="obj.setSimpleArea(843, true)" id="apf_id_1_simple_area_843" value="843">昌平</li>
                                                            <li onclick="obj.setSimpleArea(704, true)" id="apf_id_1_simple_area_704" value="704">西城</li>
                                                            <li onclick="obj.setSimpleArea(818, true)" id="apf_id_1_simple_area_818" value="818">通州</li>
                                                            <li onclick="obj.setSimpleArea(865, true)" id="apf_id_1_simple_area_865" value="865">大兴</li>
                                                            <li onclick="obj.setSimpleArea(690, true)" id="apf_id_1_simple_area_690" value="690">东城</li>
                                                            <li onclick="obj.setSimpleArea(740, true)" id="apf_id_1_simple_area_740" value="740">宣武</li>
                                                            <li onclick="obj.setSimpleArea(787, true)" id="apf_id_1_simple_area_787" value="787">石景山</li>
                                                            <li onclick="obj.setSimpleArea(729, true)" id="apf_id_1_simple_area_729" value="729">崇文</li>
                                                            <li onclick="obj.setSimpleArea(837, true)" id="apf_id_1_simple_area_837" value="837">顺义</li>
                                                            <li onclick="obj.setSimpleArea(802, true)" id="apf_id_1_simple_area_802" value="802">房山</li>
                                                            <li onclick="obj.setSimpleArea(815, true)" id="apf_id_1_simple_area_815" value="815">门头沟</li>
                                                            <li onclick="obj.setSimpleArea(856, true)" id="apf_id_1_simple_area_856" value="856">密云</li>
                                                            <li onclick="obj.setSimpleArea(2678, true)" id="apf_id_1_simple_area_2678" value="2678">周边</li>
                                                            <li onclick="obj.setSimpleArea(858, true)" id="apf_id_1_simple_area_858" value="858">怀柔</li>
                                                            <li onclick="obj.setSimpleArea(863, true)" id="apf_id_1_simple_area_863" value="863">平谷</li>
                                                            <li onclick="obj.setSimpleArea(860, true)" id="apf_id_1_simple_area_860" value="860">延庆</li>
                                                         </ul>
                            </div>
                        </div>
                        <div style="display:;" id="apf_id_1_simple_block_list" class="block">
                            <h5>选择板块</h5>
                            <div id="apf_id_1_simple_block" class="block_list"></div>
                        </div>
                        <div style="display:;" id="apf_id_1_simple_comm_list" class="comm">
                            <h5>选择小区&nbsp;<font color="#999">(小区按拼音排序)</font></h5>
                            <h2>
                                <img width="15" height="13" style="padding:6px;vertical-align:top;" src="http://pages.haozu.ajkcdn.com/20111028/img/icon/hand_15x13.gif">
                                选择小区首字母：
                                <select id="apf_id_1_simple_comm_letter" onchange="obj.get_SimpleLetterComm(this);" name="letter">
                                    <option style="font-size:12px;" value="">不限</option>
                                    <option value="A">A</option><option value="B">B</option><option value="C">C</option><option value="D">D</option><option value="E">E</option><option value="F">F</option><option value="G">G</option><option value="H">H</option><option value="I">I</option><option value="J">J</option><option value="K">K</option><option value="L">L</option><option value="M">M</option><option value="N">N</option><option value="O">O</option><option value="P">P</option><option value="Q">Q</option><option value="R">R</option><option value="S">S</option><option value="T">T</option><option value="U">U</option><option value="V">V</option><option value="W">W</option><option value="X">X</option><option value="Y">Y</option><option value="Z">Z</option>                                </select>
                            </h2>
                            <div id="apf_id_1_simple_comm" class="comm_list"></div>
                        </div>
                        <div class="clear"></div>
                        <div style="display:none;" id="apf_id_1_comm_info" class="my_prop_comm_info"></div>
                        <div class="my_prop_comm_btn">
                            <input type="button" disabled="true" id="apf_id_1_comm_btn_ok" onclick="obj.setCommInfoResult();obj.setCommType();" class="ok" value="选好了">
                            <input type="button" id="apf_id_1_simple_comm_cancel" class="cancel" value="关闭">
                        </div>
            <div class="clear"></div>
                    </div>
          <div class="clear"></div>
                </div>
                <div class="clear"></div>
            </div>
                        <!--<div class="prop_comm_other" id="_comm_other">
                您也可以&nbsp;&nbsp;<a href="javascript:void(0)" onclick="obj.selectComm();" hidefocus="true">从小区名单中选择对应小区</a>
            </div>
            -->        </td>
    </tr>

    <tr>
        <th class="basic_header">小区地址：</th>
        <td class="star">*</td>
        <td>
            <input type="text" class="default_color" maxlength="50" size="40" value="" id="apf_id_1_f47" name="xiaoqudizhi">
            <span class="floatClew" id="apf_id_1_err_f47">
                        </span>
        </td>
    </tr>

    <tr>
        <th class="basic_header">小区方位：</th>
        <td class="star">*</td>
        <td>
            <div id="apf_id_1_f3_border" class="selectBorder">
            <span class="selectSpan">
            <select id="apf_id_1_f3" name="quyu"  onchange="getShangQuanChuzu()">
                <option value="">选择区域</option>
				<?php
					for($ii=0;$ii<count($zufang_quyu_array);$ii++){
						echo "<option value='".$zufang_quyu_array[$ii]['this_id']."'  style='color:#000'> ".$zufang_quyu_array[$ii]['value']."</option>";
					}
				?>
            </select>
            </span>
            </div>

            <div id="apf_id_1_f4_border" class="selectBorder">
                <span class="selectSpan">
					<span id="apf_id_1_f4">
						<select id="f4" name="quyu2">
							<option value="0">选择板块</option>
						</select>
				    </span>

                </span>
            </div>
            <span class="floatClew" id="apf_id_1_err_f4">
                                    </span>
        </td>
    </tr>

     <tr>
        <th class="basic_header">房龄：</th>
        <td class="star">*</td>
        <td>
            <input type="text" name="fangling"  value=""  maxlength="3" class="text_width text_number default_color"> 年
            <span id="apf_id_1_err_f47" class="floatClew">
                        </span>
        </td>
    </tr>

     <tr>
        <th class="basic_header">面积：</th>
        <td class="star">*</td>
        <td>
            <input type="text" name="mianji"  value=""  maxlength="10" class="text_width text_number default_color">  平方米
            <span id="apf_id_1_err_f47" class="floatClew">
                        </span>
        </td>
    </tr>

    <tr>
        <th class="basic_header">出租方式：</th>
        <td class="star">*</td>
        <td>
                            <label class="labelChecked" for="labeltype_1"><input type="radio" value="整租" onclick="obj.setShareDisplay('apf_id_1','none')" name="chuzufangshi" id="labeltype_1" checked> 整租</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <label class="labelChecked" for="labeltype_2"><input type="radio" value="合租" onclick="obj.setShareDisplay('apf_id_1','')" name="chuzufangshi" id="labeltype_2"> 合租</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <span class="floatClew" id="apf_id_1_err_f1">
                        </span>
        </td>
    </tr>

    <tr style="display:none" id="apf_id_1_share">
        <th class="basic_header"></th>
        <td class="star"></td>
        <td>
            <select name="chuangweiyaoqiu">
                            <option value="主卧">主卧</option>
                            <option value="次卧">次卧</option>
                            <option value="床位">床位</option>
                            <option value="隔断间">隔断间</option>
                        </select>
            <select name="xingbieyaoqiu">
                            <option selected="selected" value="0">男女不限</option>
                            <option value="1">仅限男</option>
                            <option value="2">仅限女</option>
                        </select>
            <select name="nianlingyaoqiu">
                            <option selected="selected" value="0">年龄不限</option>
                            <option value="1">70后</option>
                            <option value="2">75后</option>
                            <option value="3">80后</option>
                            <option value="4">85后</option>
                            <option value="5">90后</option>
                        </select>
            <select name="zhiyeyaoqiu">
                            <option selected="selected" value="0">职业不限</option>
                            <option value="1">学生</option>
                            <option value="2">白领</option>
                            <option value="3">自由职业者</option>
                        </select>
        </td>
    </tr>

    <tr>
        <th class="basic_header">户型：</th>
        <td class="star">*</td>
        <td>
            <input type="text" value="" id="apf_id_1_f8" maxlength="1" name="huxing_shi" class="text_width text_number default_color">&nbsp;&nbsp;室，&nbsp;
            <input type="text" value="" id="apf_id_1_f9" maxlength="1" name="huxing_ting" class="text_width text_number default_color">&nbsp;&nbsp;厅，&nbsp;
            <input type="text" value="" id="apf_id_1_f10" maxlength="1" name="huxing_wei" class="text_width text_number default_color">&nbsp;&nbsp;卫&nbsp;&nbsp;
            <span class="floatClew" id="apf_id_1_err_f8">
                        </span>
        </td>
    </tr>

    <tr>
        <th class="basic_header">楼层：</th>
        <td class="star">*</td>
        <td>
            <input type="text" value="" id="apf_id_1_f20" maxlength="2" name="louceng_dangqian" class="text_width text_number default_color">&nbsp;&nbsp;层，&nbsp;
            共 <input type="text" value="" id="apf_id_1_f21" maxlength="2" name="louceng_zong" class="text_width text_number default_color">&nbsp;&nbsp;层
            <span class="floatClew" id="apf_id_1_err_f20">
                        </span>
        </td>
    </tr>

    <tr>
        <th class="basic_header">房屋情况：</th>
        <td class="star">*</td>
        <td>
            <!-- junyang 房屋类型 -->
            <div id="apf_id_1_f25_border" class="selectBorder">
                <span class="selectSpan">
                   <select id="apf_id_1_f25" name="fangwuleixing">
                        <option selected="selected" value="">选择类型</option>
                        <?php
					for($ii=0;$ii<count($zufang_leixing_array);$ii++){
						echo "<option value='".$zufang_leixing_array[$ii]['this_id']."'  style='color:#000'> ".$zufang_leixing_array[$ii]['C']."</option>";
					}
				?>
                                             <!--   <option value="四合院" style="color:#000000">四合院</option>
                                                <option value="公寓" style="color:#000000">公寓</option>
                                                <option value="普通住宅" style="color:#000000">普通住宅</option>
                                                <option value="别墅" style="color:#000000">别墅</option>
                                                <option value="酒店公寓" style="color:#000000">酒店公寓</option>
                                                <option value="其他" style="color:#000000">其他</option>-->
                                            </select>
                </span>
            </div>

            <div id="apf_id_1_f27_border" class="selectBorder">
                <span class="selectSpan">
                   <select id="apf_id_1_f27"  name="zhuangxiu">
                        <option value="">选择装修</option>
                                                    <option value="毛坯" style="color:#000000">毛坯</option>
                                                    <option value="普通装修" style="color:#000000">普通装修</option>
                                                    <option value="精装修" style="color:#000000">精装修</option>
                                                    <option value="豪华装修" style="color:#000000">豪华装修</option>
                                            </select>
                </span>
            </div>
            <div id="apf_id_1_f71_border" class="selectBorder">
                <span class="selectSpan">
                    <select id="apf_id_1_f71"   name="chaoxiang">
                        <option selected="selected" value="0">选择朝向</option>
                                                    <option value="东" style="color:#000000">东</option>
                                                    <option value="南" style="color:#000000">南</option>
                                                    <option value="西" style="color:#000000">西</option>
                                                    <option value="北" style="color:#000000">北</option>
                                                    <option value="南北" style="color:#000000">南北</option>
                                                    <option value="东西" style="color:#000000">东西</option>
                                                    <option value="东南" style="color:#000000">东南</option>
                                                    <option value="西南" style="color:#000000">西南</option>
                                                    <option value="东北" style="color:#000000">东北</option>
                                                    <option value="西北" style="color:#000000">西北</option>
                                                    <option value="不知道朝向" style="color:#000000">不知道朝向</option>
                                            </select>
                </span>
            </div>
            <span class="floatClew floatclewext" id="apf_id_1_err_f27">
                        </span>

            <!-- junyang -->
            <span class="floatClew" id="apf_id_1_err_f25">
                        </span>

        </td>
    </tr>

    <tr>
        <th class="basic_header">租金：</th>
        <td class="star">*</td>
        <td>
            <div class="floatL"><input type="text" style="_vertical-align:middle;vertical-align:middle!important; *vertical-align:baseline;_vertical-align:middle;" id="apf_id_1_f15" maxlength="7" size="10" value="" name="zujin" class="text_number default_color textC"> 元/月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;付款方式:</div>
            <div class="selectBorder">
              <span class="selectSpan">
                    <select id="apf_id_1_f16" name="jiaoyifangshi">
                                            <option selected="selected" value="付3押1">付3押1</option>
                                            <option value="付1押1">付1押1</option>
                                            <option value="付2押1">付2押1</option>
                                            <option value="付1押2">付1押2</option>
                                            <option value="年付不押">年付不押</option>
                                            <option value="半年付不押">半年付不押</option>
                                            <option value="面议">面议</option>
                                        </select>
              </span>
            </div>
            <span id="apf_id_1_err_f15">
                        </span>
         </td>
     </tr>

     <!--<tr>
        <th style="padding-top:5px;" class="basic_header">配置：</th>
        <td class="star"></td>
        <td class="prop_deploy_list">






            <ul class="prop_deploy_ul">
                                            <li><label class="labelChecked" for="labelCheckbox_3"><input type="checkbox" value="床" class="deploys" name="peizhi[]" id="labelCheckbox_3"> 床</label></li>
                                                            <li><label class="labelChecked" for="labelCheckbox_4"><input type="checkbox" value="电视" class="deploys" name="peizhi[]" id="labelCheckbox_4"> 电视</label></li>
                                                            <li><label class="labelChecked" for="labelCheckbox_6"><input type="checkbox" value="空调" class="deploys" name="peizhi[]" id="labelCheckbox_6"> 空调</label></li>
                                                            <li><label class="labelChecked" for="labelCheckbox_5"><input type="checkbox" value="冰箱" class="deploys" name="peizhi[]" id="labelCheckbox_5"> 冰箱</label></li>
                                                            <li><label class="labelChecked" for="labelCheckbox_9"><input type="checkbox" value="洗衣机" class="deploys" name="peizhi[]" id="labelCheckbox_9"> 洗衣机</label></li>
                                                            <li><label class="labelChecked" for="labelCheckbox_8"><input type="checkbox" value="热水器" class="deploys" name="peizhi[]" id="labelCheckbox_8"> 热水器</label></li>
                                                            <li><label class="labelChecked" for="labelCheckbox_1"><input type="checkbox" value="宽带" class="deploys" name="peizhi[]" id="labelCheckbox_1"> 宽带</label></li>
                                                            <li><label class="labelChecked" for="labelCheckbox_2"><input type="checkbox" value="电话" class="deploys" name="peizhi[]" id="labelCheckbox_2"> 电话</label></li>
                                                            <li><label class="labelChecked" for="labelCheckbox_7"><input type="checkbox" value="暖气" class="deploys" name="peizhi[]" id="labelCheckbox_7"> 暖气</label></li>
                                                            <li id="apf_id_1_private_bathroom" style="width:100px; display: none;"><label class="labelChecked" for="labelCheckbox_10"><input type="checkbox" value="独立卫生间" class="deploys" name="peizhi[]" id="labelCheckbox_10"> 独立卫生间</label></li>

                <li><a hidefocus="true" style="margin:0 0 0 15px;" id="apf_id_1_deploy_all" href="javascript:void(0);">全选</a> <span style="color:#0042d7">/</span> <a hidefocus="true" id="apf_id_1_deploy_no" href="javascript:void(0);">取消全选</a></li>
            </ul>
        </td>
    </tr>-->

    <tr style="display:none" id="apf_id_1_available_date">
        <th style="padding-top:5px;" class="basic_header">入住时间：</th>
        <td class="star">*</td>
        <td>
            <input type="text" readonly="readonly" class="default_color" maxlength="10" size="12" value="" id="apf_id_1_f84" name="ruzhushijian">
            <a id="apf_id_1_btn_f84" href="javascript: void(0);"><img src="http://pages.haozu.ajkcdn.com/20111028/img/icon/icon_date.gif"></a>
            <span class="floatClew" id="apf_id_1_err_f84">
                        </span>
        </td>
    </tr>


<?php

    	include_once("./fckeditor/fckeditor.php") ;

//bof fckeditor
	$oFCKeditor = new FCKeditor('jieshao') ;//字段名字
	$oFCKeditor->BasePath = './fckeditor/' ;
	$oFCKeditor->Height = 400;
	$oFCKeditor->Width = 600;
	$oFCKeditor->Config['EnterMode'] = 'br';
		//注意修改上传目录：fckeditor\editor\filemanager\connectors\php\config.php
//	$Config['UserFilesPath'] = '/upload' ;

	//上传的图片命名规则:
	//fckeditor\editor\filemanager\connectors\php\commands.php
	$sFileName=time().rand(0,100).".".$sExtension;
   ?>
    <tr>
        <th valign="top" style="padding-top:10px;" class="basic_header">详细介绍：</th>
        <td class="image_star image8">*</td>
        <td height="145">
          <!-- <textarea style="font-size: 12px; padding: 4px 2px;" maxlength="1000" id="apf_id_1_f31" name="jieshao" rows="2" cols="60"></textarea>-->
            <?php $oFCKeditor->Create() ; ?>
            <span class="floatClew" id="apf_id_1_err_f31">
                        </span>
        </td>
    </tr>


    <tr>
        <th class="basic_header"><p style="margin-top:0px;">图片：</p></th>
        <td colspan=2>
   <div id="custom-demo" class="demo">
        <style type="text/css">
        #custom-demo .uploadifyQueueItem {
  background-color: #FFFFFF;
  border: none;
  border-bottom: 1px solid #E5E5E5;
  font: 11px Verdana, Geneva, sans-serif;
  height: 50px;
  margin-top: 0;
  padding: 10px;
  width: 350px;
}
#custom-demo .uploadifyError {
  background-color: #FDE5DD !important;
  border: none !important;
  border-bottom: 1px solid #FBCBBC !important;
}
#custom-demo .uploadifyQueueItem .cancel {
  float: right;
}
#custom-demo .uploadifyQueue .completed {
  color: #C5C5C5;
}
#custom-demo .uploadifyProgress {
  background-color: #E5E5E5;
  margin-top: 10px;
  width: 100%;
}
#custom-demo .uploadifyProgressBar {
  background-color: #0099FF;
  height: 3px;
  width: 1px;
}
#custom-demo #custom-queue {
  border: 1px solid #E5E5E5;
  height: 213px;
margin-bottom: 10px;
  width: 370px;
}				</style>
        <div class="floatL" style="padding-left:14px;">
		<input type="file" class="multi" maxlength="5" accept="jpg|png|gif" name="upload_files[]"/>
       </div>
      </div>
      </div>
</div>
             <div class="clear"></div>
        </td>
    </tr>


    <tr>
        <th class="basic_header">联系电话：</th>
        <td class="star">*</td>
        <td width="700px" valign="middle">
              <table width="700" cellspacing="0" cellpadding="0" border="0">
                <tbody><tr>
                    <td width="156"><input type="text" id="apf_id_1_f33" maxlength="11" oldvalue="" value="" name="dianhua" class="text_number default_color">
					</td>
                    <td>
                        <span id="apf_id_1_err_f33">
							<input type="checkbox" id="hidephone" name="hidephone" value="1" checked="checked"/>号码部分显示
						</span>
                    </td>
                </tr>
              </tbody></table>
        </td>
    </tr>
<!-- 联系人信息  -->
    <tr>
        <th class="basic_header">联系人：</th>
        <td class="star"></td>
        <td width="700px">
            <input type="text" class="default_color" style="width:50px;vertical-align:middle!important; *vertical-align:baseline;" maxlength="3" value="<?php echo $username ?>" name="lianxiren" id="apf_id_1_f50">
                            <label class="labelChecked" for="apf_id_1_f51_1">&nbsp;&nbsp;<input type="radio" checked="" value="1" id="apf_id_1_f51_1" name="xingbie"> 先生</label>
                            <label class="labelChecked" for="apf_id_1_f51_2">&nbsp;&nbsp;<input type="radio" value="2" id="apf_id_1_f51_2" name="xingbie"> 女士</label>
                    </td>
    </tr>




    <!-- 2011-8-25 招财猫项目  -->
    <!-- 2011-10-20 招财猫项目 隐藏 -->
        <tr style="display:none;">
        <th class="basic_header cat_header">我要快租：</th>
        <td class="star cat_con">&nbsp;</td>
        <td class="cat_con">
            <input type="radio" value="gong" name="pay_now"> <strong class="mr20">包租公卡 <span class="dark_red f14">￥</span><span class="dark_red f16">30</span></strong>
            <input type="radio" value="po" name="pay_now"> <strong class="mr20">包租婆卡 <span class="dark_red f14">￥</span><span class="dark_red f16">50</span></strong>
            <input type="radio" value="0" name="pay_now"> <strong class="mr20">暂时不买</strong>
            <span class="c_gray6">想让您的房子更快出租吗？立即购买“包租卡”吧！</span> <a target="_blank" href="http://beijing.haozu.com/promotion/luckycat/">了解详情&gt;&gt;</a>
        </td>
    </tr>



    <tr>
        <td style="height:1px;" colspan="3"><div class="prop_info_end"></div></td>
    </tr>
    <tr>
        <th></th>
        <td></td>
        <td>
            <input type="checkbox" class="my_prop_protocol" checked="checked" value="1" name="tongyi" id="apf_id_1_fp">
            <a style="font-size:12px;color:#b3b3b3;text-decoration:underline;" hidefocus="true" target="_blank" href="http://beijing.haozu.com/help/agreement/">我已经阅读并同意《好租用户协议》</a>
        </td>
    </tr>
    <tr>
        <td style="height:15px;" colspan="3"></td>
    </tr>
    <tr>
        <td style="height:33px;">&nbsp;</td>
        <td></td>
        <td>
            <div class="bt_common">
                                <input type="submit" name="submit" id="apf_id_1_post" class="my_prop_issuebt" value="发布房源">
            </div>
        </td>
    </tr>
</tbody></table>
</div>
<div class="blank60"></div>
<div class="footer_line"></div>
<div style="display:none">
    <iframe name="uploadimgtarget" id="uploadimgtarget"></iframe>
</div>
</div>
<div style="display:none">
    <input type="hidden" value="8,9,10,20,21," name="check_num" id="apf_id_1_num">
    <input type="hidden" value="" name="f5" id="apf_id_1_commid">
    <!-- 判断是点选还是搜索框来匹配 -->
    <input type="hidden" value="" name="comm_type" id="apf_id_1_comm_type">
    <!-- 图片上传总数  -->
    <input type="hidden" value="" name="img_count" id="apf_id_1_img_count">
    <div id="del_apf_id_1">
        </div>
    <div id="add_apf_id_1">
        </div>
</div>
</form>
</div></div>

